<h2><?=tr('Games')?></h2>
<?
	$games = fgsGames::get(null, true);

	$table = new htmlTable();
	$table->setHeader('logo', array(
		'title' => tr('Logo'),
		'width'	=> '48px',
	));
	$table->setHeader('gid', array(
		'title' => tr('Gid'),
		'width'	=> '15ex',
	));
	$table->setHeader('name', array(
		'title' => tr('Name'),
		'width'	=> '30ex',
	));
	$table->setHeader('url', array(
		'title' => tr('Url'),
	));

	foreach ($games as $game) {
		if (!empty($game['logo_data']))
			$table->set('logo', fgsBase::linkPage(
				sprintf('<img src="%s"/>', fgsBase::link('game', array($game['gid'], 'logo'))),
				'game',
				array($game['gid'])
			));
		$table->set('gid', fgsBase::linkPage($game['gid'], 'game', array($game['gid'])));
		$table->set('name', $game['name']);
		$table->set('desc', $game['description']);
		$table->set('url', sprintf('<a href="%s">%s</a>', $game['url'], $game['url']));
		$table->push();
	}

	echo $table->render();
?>
